//
//  BasePC.h
//  BaseCode
//
//  Created by 曹连华 on 2020/3/24.
//

#import "BaseContainerController.h"

NS_ASSUME_NONNULL_BEGIN
@class BasePC;

@protocol BasePCDelegate <NSObject>

@optional
//是否能够点击空白区域，dismiss当前呈现的界面
- (BOOL)shouldDismissPresentationController:(BasePC *)aPresentationController;

//将要呈现
- (void)willPresentPC:(BasePC *)aPresentationController;

//已经呈现
- (void)didPresentPC:(BasePC *)aPresentationController;

//将要消失
- (void)willDismissPC:(BasePC *)aPresentationController;

//已经消失
- (void)didDismissPC:(BasePC *)aPresentationController;

@end

@interface BasePC : BaseContainerController

//代理
@property(nonatomic, weak) id <BasePCDelegate> pcDelegate;
//动画持续时间
@property(nonatomic) NSTimeInterval duration;
//背景view
@property(nonatomic, strong, readonly) UIView *dimmingView;
//设置背景view的位置
@property(assign, nonatomic) UIEdgeInsets dimmingEdge;

/**
 *  做动画的VC
 */
@property(nonatomic, strong) UIViewController *animationVC;
/**
 *  做动画的view
 */
@property(nonatomic, strong) UIView *animationView;

@end

NS_ASSUME_NONNULL_END
